package com.mapper;

import com.pojo.CePing_x;
import com.pojo.QingXu_x;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface QingXuMapper_x {
    @Select("select * from qingxu_x where c_id = #{id}")
    List<QingXu_x> findById(Integer id);

    @Select("select count(id) from qingxu_x where c_id = #{id}")
    Integer getNum(Integer id);

    @Insert("insert into qingxu_x (title,content,del,c_id) values (#{title},#{content},#{del},#{cId})")
    Integer add(QingXu_x qingXuX);

    @Update("update qingxu_x set title=#{title},content=#{content},del=#{del},c_id=#{cId} where id=#{id}")
    Integer update(QingXu_x qingXuX);

    @Delete("delete from qingxu_x where id=#{id}")
    Integer delete(Integer id);
    public List<QingXu_x> select(@Param("id") Integer id, @Param("title") String title,@Param("content") String content);
}
